home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / Quill / Source / PaneListTool.cpp < prev    next >
Text File  |  1997-02-20  |  2KB  |  74 lines

  1. /*
  2.  *  File:       PaneListTool.h
  3.  *    Function:    A tool window containing a list of all the Raven panes.
  4.  *  Written by: Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1996 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *  Change History (most recent first):    
  10.  *
  11.  *         <->     9/02/96    JDJ        Created
  12.  */
  13.  
  14. #include "PaneListTool.h"
  15.  
  16. #include "ViewContainer.h"
  17.  
  18.  
  19. // ===================================================================================
  20. //    class CPaneListTool
  21. // ===================================================================================
  22.  
  23. static TReanimatorRegister<CPaneListTool> sPaneListToolRegistrar;
  24.  
  25. //---------------------------------------------------------------
  26. //
  27. // CPaneListTool::~CPaneListTool
  28. //
  29. //---------------------------------------------------------------
  30. CPaneListTool::~CPaneListTool()
  31. {
  32. }
  33.  
  34.  
  35. //---------------------------------------------------------------
  36. //
  37. // CPaneListTool::CPaneListTool
  38. //
  39. //---------------------------------------------------------------
  40. CPaneListTool::CPaneListTool()
  41. {
  42. }
  43.  
  44.  
  45. //---------------------------------------------------------------
  46. //
  47. // CPaneListTool::Create (MReanimatable*)                [static]
  48. //
  49. //---------------------------------------------------------------
  50. MReanimatable* CPaneListTool::Create(MReanimatable*)
  51. {
  52.     return new CPaneListTool;
  53. }
  54.  
  55.  
  56. //---------------------------------------------------------------
  57. //
  58. // CPaneListTool::OperatesOn
  59. //
  60. //---------------------------------------------------------------
  61. bool CPaneListTool::OperatesOn(TWindow* wind) const
  62. {
  63.     bool target = false;
  64.     
  65.     if (dynamic_cast<CViewContainer*>(wind->FindSubPane("CViewContainer")) != nil)
  66.         if (wind->HasAttribute("Editing"))
  67.             if (wind->GetLayer() == kRegularLayer)
  68.                 target = true;
  69.                 
  70.     return target;
  71. }
  72.  
  73.  
  74.